﻿namespace VisualWip.Core
{
    public class Slot
    {
        private readonly bool _isAvailableSlot;
        private readonly int _workPosition;
        private readonly int _workInProgressLimit;

        public Slot(int workInProgressLimit, int workPosition, bool isAvailableSlot)
        {
            _workInProgressLimit = workInProgressLimit;
            _isAvailableSlot = isAvailableSlot;
            _workPosition = workPosition;
        }

        public WorkItem WorkItem { get; set; }

        public bool HasWorkInProgressLimit
        {
            get { return _workInProgressLimit > 0; }
        }

        public bool IsInWorkInProgressLimit
        {
            get { return _workInProgressLimit > _workPosition; }
        }

        public bool IsAvailableSlot
        {
            get { return _isAvailableSlot; }
        }
    }
}